import React from "react"
import fang from "../../imgs/盘.jpg"
import gun from "../../imgs/gun.JPG"
class Fang extends React.Component{
    constructor(){
        super()
        this.state={
            
        }
    }
       zhuan() {
        // console.log('执行了');
        this.setState({
            haha: "running"
        })
    }
    ting() {
        this.setState({
            haha: ""
        })
    }
    render(){
        // console.log(JSON.parse(localStorage.getItem("fang_info")).a)
        return(
            <div className="sst_fang">
                <h1 className="sst_name">{JSON.parse(localStorage.getItem("fang_info")).name}</h1>
                <img src={fang} className="sst_fangimg1"/>
                {/* <img src={gun}  className="sst_fangimg2"/> */}
                <audio src={JSON.parse(localStorage.getItem("fang_info")).a} controls className='sst_audio'
                onPlay={this.zhuan.bind(this)
                } 
                onPause={this.ting.bind(this)} 
                controlsList="nodownload"></audio>
            </div>
        )
    }
}
export default Fang